﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace SysRouteLinq
{
    public partial class CadParada : Form
    {
        public CadParada()
        {
            InitializeComponent();
        }
        private SysRouteDataContext dc = new SysRouteDataContext();

        private void button1_Click(object sender, EventArgs e)
        {
            Parada Par = new Parada
            {
                nome = textBox2.Text,
                referencia = textBox3.Text,
                
            };
            dc.Paradas.InsertOnSubmit(Par);
            dc.SubmitChanges();

            MessageBox.Show("Cadastro Realizado com sucesso");

            textBox2.Clear();
            textBox3.Clear();
                
        }

        private void button2_Click(object sender, EventArgs e)
        {
            Close();
        }
    }
}
